The hunt continues. From a simple file share to a full system compromise, this session demonstrates the power of persistence and lateral movement. 🚩
Inside the share, I found a text file mentioning that John Cactus has office timings on SSH. I found a hidden directory called .ssh.
cd into them, but .ssh allowed me in!id_rsa.pub) and a private key (id_rsa). I downloaded both.After exiting the SMB client, I had to prepare the private key for the connection.
I ran chmod 600 id_rsa.
600 makes it private to only you.I used the -i flag to tell SSH to use my downloaded private key instead of a password.
Command:
ssh -i id_rsa cactus@[TARGET_IP]
Note: We always use the private key for the connection. The username
cactuswas found inside the public key file earlier.
Boom! The connection was successful. Once inside the server, I found the file, used the cat command to read it, and obtained the FLAG 🚩.